//
//  AnnouncementCell.m
//  SeaMelonSeeds_Counselor
//
//  Created by 尤振宇 on 2017/7/25.
//  Copyright © 2017年 杨笑. All rights reserved.
//

#import "AnnouncementCell.h"
#import "JHMacros.h"

@implementation AnnouncementCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.backgroundColor = [UIColor clearColor];
    self.contentView.backgroundColor = [UIColor clearColor];
    // Initialization code
}

-(void)setTitle:(NSString *)title text:(NSString *)text
{
    NSMutableAttributedString *string = [[NSMutableAttributedString alloc]initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]}];
    [string appendAttributedString:[[NSAttributedString alloc]initWithString:@"\n"]];
    [string appendAttributedString:[[NSAttributedString alloc]initWithString:text attributes:@{NSForegroundColorAttributeName:k666666,NSFontAttributeName:[UIFont systemFontOfSize:14]}]];
    NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
    [style setLineSpacing:10];
    [string addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, string.length)];
    
    self.content.attributedText = string;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
